<script language="javascript" src="/Public/static/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<div id="main-content">
    <div id="main" class="main">
		<div class="user-hd">
			<h2>系统管理>>{$page_title}</h2>
		</div>	
		<div class="clearfix searchspin">
			<dl>
				<dt>筛选条件:</dt>
				<dd>
					<form method="get" action="{:U('Admin/Apply/applyList')}">
						起止时间：<input type="text" name="create_time_start" id="create_time_start" value="{$_GET['create_time_start']}" class="Wdate bg-input mr5" <literal>onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'create_time_end\')||\'%y-%M-%d\'}'})"</literal> readonly="readonly" size="30" style="width: 90px;"/>
                        <input type="text" name="create_time_end" id="create_time_end" value="{$_GET['create_time_end']}" class="Wdate bg-input mr5" <literal>onfocus="WdatePicker({minDate:'#F{$dp.$D(\'create_time_start\')}',maxDate:'%y-%M-%d'})"</literal> readonly="readonly" size="30" style="width: 90px;" />
						处理状态：<select name="status" class="" style="height:30px;">
						  <option value ="0" <?php if($_GET['status']==0){echo "selected";}?>  >-</option>
						  <option value ="1" <?php if($_GET['status']==1){echo "selected";}?> >已处理</option>
						  <option value ="2" <?php if($_GET['status']==2){echo "selected";}?> >未处理</option>
						</select>
						<input type="text" name="keywords" class="bg-input w195" value="{$_GET['keywords']}" placeholder="请输入手机号码" value="">
						<a href="{:U('Admin/Apply/applyList')}" class="sblue-btn" style="height:28px;width:68px;">清空 </a>
						<button class="sblue-btn" id="video_search" onclick="this.form.submit();">检索</button>
					</form>
				</dd>
			</dl>
		</div>
        <div class="spin-cont">
            <table>
                <tr>
                    <th class="spin-tit" style="width: 100px;">编号</th>
                    <th class="spin-tit" style="width: 130px;">申请时间</th>
                    <th style="width: 130px;">姓名</th>
                    <th style="width: 130px;">电话</th>
                    <th style="width: 130px;">邮箱</th>
                    <th style="width: 130px;">处理状态</th>
					<th style="width: 130px;">处理人</th>
                    <th style="width: 320px;">操作</th>
                </tr>
                <volist name="list" id="vo">
                <tr>
                    <td class="spin-tit">{$vo.id}</td>
                    <td class="spin-tit">{$vo.ctime|date="Y-m-d",###}</td>
                    <td>{$vo.username}</td>
                    <td>{$vo.phone}</td>
                    <td>{$vo.email}</td>
                    <td>
						<switch name="vo.status">
							<case value="0"><font color="red">未处理</font></case>
							<case value="1"><font color="green">已处理</font></case>
						</switch>
					</td>
					<td>{$vo.user_id|getUserName}</td>
                    <td>
							<switch name="vo.status" >
								<case value="0"><a href="{:U('Admin/Apply/update',array('id'=>$vo['id']))}" >处理</a></case>
								<case value="1"><a href="{:U('Admin/Apply/detail',array('id'=>$vo['id']))}" >详情</a></case>
							</switch>						
                    </td>
                </tr>
                </volist>
            </table>
            <div class="page txt-center">
                {$page}
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
	var id;
	function agentStop(id){
		$.ajax({
			url:"{:U('Admin/Agent/stop')}",
			type:"post",
			data:{'id':id},
			success:function(data,status,xhr){
					alertMessage(data.info, '', 2);
					setInterval(function(){
						window.location.reload();
					},2000);
					
			},
		})
	}
	function agentStart(id){
		$.ajax({
			url:"{:U('Admin/Agent/start')}",
			type:"post",
			data:{'id':id},
			success:function(data,status,xhr){
					alertMessage(data.info, '', 2);
					setInterval(function(){
						window.location.reload();
					},2000);
					
			},
		})
	}	
	
</script>